// Copyright 2016 The Servo Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.


mod utils;

mod aliased_cell;

mod nodebug;
mod message;
mod win_handle;




mod async_data;



mod enums;
pub mod ipc_receiver;
pub mod ipc_sender;

pub mod share_memory;

pub mod ipc_bridge;



use lazy_static::lazy_static;

lazy_static! {
    static ref DEBUG_TRACE_ENABLED: bool = std::env::var_os("IPC_CHANNEL_WIN_DEBUG_TRACE").is_some();
}



/// Debug macro to better track what's going on in case of errors.
#[macro_export]
macro_rules! win32_trace {
    ($($rest:tt)*) => {
        if cfg!(feature = "win32-trace") {
            println!($($rest)*);
            // if *DEBUG_TRACE_ENABLED { println!($($rest)*); }
        }
    }
}